Executes all event listeners added with <span class="argument">on()</span> method.

<div class="definition">
    trigger(eventData)
</div>

<div class="arguments">
    <table>
    <tr>
        <td>eventData</td>
        <td><b>object</b>, parameters of the event</td>
    </tr>
    </table>
</div>

Returns <i>object</i>.

<h4>Description</h4>

Internally, all w2ui widgets call trigger to execute event listeners. You can add your own events and trigger them with the
trigger function. The trigger function has a specific life cycle, your first trigger the event and then you signal when event is
completed. You trigger the event before the default behavior is processed and the signal completionafter it it processed. This
is needed to comply with the event flow.
<div style="height: 10px"></div>

Here is an example how widgets trigger events:
<textarea class="javascript">
// event before
var edata = this.trigger('click', { target: this.name, recid: recid, event: event })
if (event.cancelled === true) return false;

// default action

// event after
edata.finish()
</textarea>

As you see from the example above, the default action can be cancelled by event handler calling
<span class="argument">event.preventDefault()</span>. There is no need to return <span class="argument">event</span>
object because JavaScript passes objects by reference and changing the
<span class="argument">event</span> within the handler will change the original object.
<div style="height: 10px"></div>

You can optionally call <span class="argument">event.done(callBack)</span> to prive a funciton which will be executed
at the end of event life cycle (after default behaviour is complete).
